﻿@model IRIS.Models.NewsViewModel

@{
    ViewBag.Title = "IRIS Ættleiðingartengd fræðsla";
}
@foreach (var item in Model.m_News)
{
        <div class="news">
    		<h2>@Html.ActionLink(item.ContentTitle, "Details", "Content", new { id = item.ID }, null)<span class="contentdate">Dagsetning: @item.Created.ToShortDateString()</span> </h2>
    		<p class="overflow">
			    @{ var segment = item.ContentText; } 
			    @Html.Raw(segment)
		    </p>
            <span class="readmore">Lesa meira!</span>
		</div>
    
}

<!--Pages-->
 <div id="page">
   <span>Eldra efni</span>
 <ul>
@if (Model.m_Pages > 0)
{
   
	for (int i = 0; i < Model.m_Pages; i++) 
	{
		<!--Workaround-->
		<li><a href="Content/page/?thePage=@i&theNews=true">@(i+1)</a></li> 
	}
    
}
</ul>
</div>
